package com.projet.activities;

import com.example.labyrinth.R;
import com.projet.activities.listeners.ListenerNiveau;
import com.projet.activities.listeners.ListenerTest;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.Button;

public class MainActivity extends Activity {

	//Labyrinthe labyrinthe;
	
		Button boutonNiveau1;
		Button boutonNiveau2;
		Button boutonNiveau3;
		Button boutonAPropos;
		
		@Override
		protected void onCreate(Bundle savedInstanceState) 
		{
			super.onCreate(savedInstanceState);
			setContentView(R.layout.activity_main);
			boutonNiveau1 = (Button) findViewById(R.id.id_niveau1);
			boutonNiveau2 = (Button) findViewById(R.id.id_niveau2);
			boutonNiveau3 = (Button) findViewById(R.id.id_niveau3);
			boutonAPropos = (Button) findViewById(R.id.id_a_propos);
			
			boutonNiveau1.setOnClickListener(new ListenerNiveau(this, "niveau1.txt"));
			boutonNiveau2.setOnClickListener(new ListenerNiveau(this, "niveau2.txt"));
			boutonNiveau3.setOnClickListener(new ListenerNiveau(this, "niveau3.txt"));
			boutonAPropos.setOnClickListener(new ListenerTest(this));
			
		}

		@Override
		public boolean onCreateOptionsMenu(Menu menu) {
			// Inflate the menu; this adds items to the action bar if it is present.
			getMenuInflater().inflate(R.menu.main, menu);
			return true;
		}
		
		@Override
		protected void onPause() {
			super.onPause();
			//labyrinthe.pause();
		}

		@Override
		protected void onResume() {
			super.onResume();
			//labyrinthe.resume();
		}

}
